#!/usr/bin/python
# -*- coding:utf-8 -*-
# @FileName : python_test6_11.py
# Author    : myh

# 练习 6.12：扩展　本章的示例足够复杂，能以很多方式进行扩展。请
# 对本章的一个示例进行扩展：添加键和值，调整程序要解决的问题，
# 或改进输出的格式。

users = {
    'aeinstein': {
        'first': 'albert',
        'last': 'einstein',
        'location': 'princeton',
    },
    'mcurie': {
        'first': 'marie',
        'last': 'curie',
        'location': 'paris',
    },
}
# origin
# for username, user_info in users.items():
#     print(f"\nUsername: {username}")
#     full_name = f"{user_info['first']} {user_info['last']}"
#     location = user_info['location']
#     print(f"\tFull name: {full_name.title()}")
#     print(f"\tLocation: {location.title()}")

# new
for key, values in users.items():
    print(f"\n{key}'s information is:")
    for value_k, value_v in values.items():
        print(f"{value_k} name is :{value_v.title()}")